import React from 'react';
import {useProList,useProListAsync} from "../../../../myHooks"

export default function Index() {
  
  const { count, setCount,
    limitNum, setLimitNum,
    proList } = useProListAsync();

  return (
    <>
      <div>自定义hooks</div>
      页码：
      <input type="text" value={count} onChange={(ev) => setCount(ev.target.value)} /><br />
      每页的条数：
      <input type="text" value={limitNum} onChange={(ev) => setLimitNum(ev.target.value)} /><br />
      <hr />
      <h3>商品列表</h3>
      <ul>
        {
          proList.map(item => (
            <li key={item.proid}>{item.proid}</li>
          ))
        }
      </ul>

    </>
  )
}

